
project(MockModel)
add_library(MockModel SHARED 
	MockModel_dllexport.cpp 
	MockModel.h
	MockModel.cpp 
)

project(MockModelTest)
add_executable( MockModelTest 
	MockModelTest.cpp 
	MockModel.h
	MockModel.cpp 
	${CMAKE_SOURCE_DIR}/src/Testing.h
)
add_test( MockModelTest ${EXECUTABLE_OUTPUT_PATH}/MockModelTest )

project(ModelDllTest)
add_executable( ModelDllTest 
	ModelDllTest.cpp 
	${CMAKE_SOURCE_DIR}/src/ModelSimulator.h
	${CMAKE_SOURCE_DIR}/src/ModelSimulator.cpp
	${CMAKE_SOURCE_DIR}/src/Testing.h
)

#TODO error- the followinf resturns D:/.../bin/$(OutDir)/MockModel.dll"
#GET_TARGET_PROPERTY( MockModelTest_location MockModel LOCATION)
#add_test( ModelDllTest ${EXECUTABLE_OUTPUT_PATH}/ModelDllTest ${MockModelTest_location} )
# hack (works for me, but probably not for anyone else:
add_test( ModelDllTest ${EXECUTABLE_OUTPUT_PATH}/ModelDllTest "D:/temp/openfms/msvc9/bin/Debug/MockModel.dll" )

add_dependencies( ModelDllTest  MockModel )

